A complex number is a number of the form x=xr+jx1: where xr is called the real part of the complex number; x1 is called the imaginary part of the complex number; and j is the square root of −1, the basic imaginary number. Complex numbers are often used to represent two dimensional vector quantities, the real and imaginary parts forming two perpendicular components of the vector. In this representation the magnitude of the vector can be obtained from the absolute value of the complex number.
The absolute value of the number x is calculated as the square root of the sum of the squares of its real and imaginary parts. This is:ABS(x)=√{square root over (Xr2+X12)}Some digital processing applications require multiple computations of the magnitude of a two dimensional vector. This computation is the equivalent of calculating the absolute value of a complex number.